<?php
/**
 * @user:andy
 * @date:2021/7/4
 * @company:http://www.sjdphp.com
 * @desc:
 */

namespace app\admin\validate;


use think\Validate;

class PlateValidate extends Validate
{
    protected $rule = [
        'plate_id'   => 'require|number',
        'plate_name' => 'require',
    ];

    protected $message = [
        'plate_id.require' => '参数不能为空',
        'plate_id.number'  => '参数不合法',
        'plate_name.require'    => '板块名称不能为空',
    ];

    protected $scene = [
        'add'  => ['plate_name'],
        'edit' => ['plate_id','plate_name']
    ];
}